package cate.game.role.farm.udgpalace.msg;

import cate.common.util.GameResult;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBUdgPalace;
import easy.java.dev.note.NoteField;

@ClientMsg(title = "地宫探险挑战的请求")
public class UdgPalaceChallengeReq implements MsgInput {
    @NoteField("bossId")
    public int bossId;
    @NoteField("食灵uid")
    public String heroUid;
    @NoteField("跳过战斗")
    public boolean skip;
    @NoteField("特殊标识, 前端专用")
    public boolean special;

    @Override
    public void execute(GameBody game, ClientContext cc) {
        GameResult<Void> r = cc.getRole().getFarm().udgPalace.challenge(heroUid, bossId, skip, special);
        game.notice.message(cc.getRole(), r, true);
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBUdgPalace.CHALLENGE_REQ;
    }
}
